package com.CNMedical.system.domain.vo;

import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.CNMedical.system.domain.entity.AppletKnowledge;
import com.CNMedical.system.domain.entity.AppletKnowledgeComment;
import com.CNMedical.system.domain.entity.AppletUser;
import lombok.Data;

import java.util.List;

/**
 * 知识留言对象 applet_knowledge_comment
 * 
 * @author tang
 * @date 2023-03-29
 */
@Data
public class AppletKnowledgeCommentVO extends AppletKnowledgeComment
{
    @BindField(entity = AppletUser.class,field = "id",condition = "this.user_id = id")
    private String userId;

    @BindField(entity = AppletUser.class,field = "nickName",condition = "this.user_id = id")
    private String nickName;

    @BindEntityList(entity = AppletKnowledgeComment.class, condition = "this.id = pid" ,deepBind = true)
    private List<AppletKnowledgeCommentVO> childCommentVoList;

    @BindField(entity = AppletKnowledge.class ,field = "title", condition = "this.knowledge_id = id")
    private String knowledgeTitle;
}
